<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ include file="taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <t:header title="Edit User"/>
    </head>
    <body>
        <div id="header">
            <div id="titleSection">
                <t:pageheader title="Edit User"/>
            </div>
        </div>
        <div id="contentPanel">
            
            <div id="pageContent">
                <div class="sectionTitle">Edit User</div>
                <s:errors/>
                <s:form action="/User.action">

                    <table class="leftRightForm">
                        <col />
                        <col />
                        <col width="60px"/>
                        <col />
                        <col />
                        <col />
                        <tr>
                            <th><s:label name="user.id">User Id:</s:label></th>
                            <td>
                                ${actionBean.user.id}<s:hidden name="user.id"/>
                                <s:hidden name="page"/>
                                <s:hidden name="mode"/>
                            </td>
                            <td><s:errors field="user.id"/></td>
                        </tr>
                        <tr>
                            <th><s:label name="user.firstName">First Name:</s:label></th><td><s:text name="user.firstName" tabindex="1"/></td><td><s:errors field="user.firstName"/></td>
                            <th><s:label name="user.childName1">First Child's Name:</s:label></th><td><s:text name="user.childName1" /></td><td><s:errors field="user.childName1"/></td>
                        </tr>
                        <tr>
                            <th><s:label name="user.lastName">Last Name:</s:label></th><td><s:text name="user.lastName" tabindex="2"/></td><td><s:errors field="user.lastName"/></td>
                            <th><s:label name="user.childTeacherId1">First Child's Teacher:</s:label></th>
                            <td>
                                <s:select name="user.childTeacherId1">
                                    <s:options-collection collection="${actionBean.teachers}" value="id" label="fullName"/>
                                </s:select>
                            </td>
                            <td><s:errors field="user.childName1"/></td>
                        </tr>
                        <tr>
                            <th><s:label name="user.email">Email:</s:label></th><td><s:text name="user.email" tabindex="3"/></td><td><s:errors field="user.email"/></td>
                            <th><s:label name="user.childname2">Second Child's Name:</s:label></th><td><s:text name="user.childName2" /></td><td><s:errors field="user.childname2"/></td>
                        </tr>
                        <tr>
                            <th><s:label name="user.password">Password:</s:label></th><td><s:text name="user.password" tabindex="4"/></td><td><s:errors field="user.password"/></td>
                            <th><s:label name="user.childTeacherId2">Second Child's Teacher:</s:label></th>
                            <td>
                                <s:select name="user.childTeacherId2">
                                    <s:options-collection collection="${actionBean.teachers}" value="id" label="fullName"/>
                                </s:select>
                            </td>
                            <td><s:errors field="user.childname2"/></td>
                        </tr>
                        <tr>
                            <th><s:label name="user.phoneNumber">Phone Number:</s:label></th><td><s:text name="user.phoneNumber" tabindex="5"/></td><td><s:errors field="user.phoneNumber"/></td>
                            <th><s:label name="user.childname3">Third Child's Name:</s:label></th><td><s:text name="user.childName3" /></td><td><s:errors field="user.childname3"/></td>
                        </tr>
                        <tr>
                            <th></th><td></td><td></td>
                            <th><s:label name="user.childTeacherId3">Third Child's Teacher:</s:label></th>
                            <td>
                                <s:select name="user.childTeacherId3">
                                    <s:options-collection collection="${actionBean.teachers}" value="id" label="fullName"/>
                                </s:select>
                            </td>
                            <td><s:errors field="user.childname3"/></td>
                        </tr>
                        <tr>
                            <th></th><td></td><td></td>
                            <th><s:label name="user.childName4">Fourth Child's Name:</s:label></th><td><s:text name="user.childName4" /></td><td><s:errors field="user.childName4"/></td>
                        </tr>
                        <tr>
                            <th></th><td></td><td></td>
                            <th><s:label name="user.childTeacherId4">Fourth Child's Teacher:</s:label></th>
                            <td>
                                <s:select name="user.childTeacherId4">
                                    <s:options-collection collection="${actionBean.teachers}" value="id" label="fullName"/>
                                </s:select>
                            </td>
                            <td><s:errors field="user.childName4"/></td>
                        </tr>
                        <tr>
                            <th></th><td></td><td></td>
                            <th><s:label name="user.admin">Is Administrator:</s:label></th><td><s:checkbox name="user.admin" /></td><td><s:errors field="user.admin"/></td>
                        
                        </tr>
                    </table>
                    <div class="buttons">
                        <s:submit value="Save" name="save"/>
                        <t:buttonLink value="Cancel" beanclass="pkg.action.UserActionBean">
                            <t:param name="page" value="${actionBean.page}"/>
                        </t:buttonLink>
                    </div>
                </s:form>
            </div>
        </div>
    </body>
</html>
